#include "LogicBase.h"

bool LogicBase::isOutOfBounds(int index, int size) {
	bool outOfBounds;

	if( index <= 0 ) {
		outOfBounds = true;
	} else if( index > size ) {
		outOfBounds = true;
	} else {
		outOfBounds = false;
	}

	return outOfBounds;
}

bool LogicBase::isMultipleMatches(int size) {
	
	bool multipleMatches;
	
	if( size == 1 ) {
		multipleMatches = false;
	} else {
		multipleMatches = true;
	}

	return multipleMatches;
}

void LogicBase::copyTasks(vector<Task>& tasks, vector<Task>& tasksVector) {
	for( unsigned int i=0; i<tasks.size(); i++ ) {
		tasksVector.push_back(tasks[i]);
	}
}

const string LogicBase::NOT_FOUND_ERROR_MESSAGE = "Task Not Found";

const string LogicBase::INDEX_OUT_OF_BOUNDS_ERROR_MESSAGE = "Invalid Task Number";